{% extends "stories/base.html" %}
{% load formfields i18n %}

{% block head_title %}
{% if object %}
Edit Flash Project: {{ object }}
{% else %}
Add Flash Project 
{% endif %} 
{% endblock %}


{% block main_content %}

<h1>{{ story.headline }} <span class="headline-options">(<a href="{% url stories_story_pages story.id %}">edit story pages</a>)</span></h1>

    {# TODO auto-slugify headline (or customize admin) #}

    <div class="edit-story-tabs">
        <div class="tab-links">
            <a href="{% url stories_edit_story story.id %}" rel="story-info">Properties</a>
            <a href="{% url stories_story_media story.id %}" rel="story-media" class="active">Media</a>
            <a href="{% url stories_story_add_edit_point story.id %}" rel="story-media" >Geotag</a>
            <br class="clearboth" />
        </div>
        <div class="tab-contents">

            <div id="story-info" class="tab hidden">
            </div>


            <div id="story-media" class="tab">

            {% if object %}
            <h2>Edit Flash Project: {{ object }}</h2>
            {% else %}
            <h2>Add Flash Project</h2>
            {% endif %} 

            <form method="post" enctype="multipart/form-data">
            <fieldset class="inlineLabels">
            {{form.as_p}}
            {{frame_form.as_p}}
            
            <div class="form_block rounded-block">
            <input type="submit" value="Save"/>
            <a href="{% url stories_story_media story.id %}">Cancel</a> 
            </div>
            </fieldset>
            </form>

            </div>

            <br class="clear" />

        </div>

    </div>

{% endblock %}
